<?php

function some_plugin(pear2::template_engine::Template $template)
{
    return __FUNCTION__;
}

class ASimpleClass
{
    public function someMethod(pear2::template_engine::Template $template)
    {
        return __METHOD__;
    }
    
    public function someMethodWithParam(pear2::template_engine::Template $template, $param)
    {
        return $param;
    }
    
    public static function someStaticMethod(pear2::template_engine::Template $template)
    {
        return __METHOD__;
    }
}

// sanity check
$obj = new ASimpleClass();
assert('$obj->someMethod($template) == "ASimpleClass::someMethod"');
$random = "random number: " . rand(100, 200);
assert('$obj->someMethodWithParam($template, $random) == $random');
assert('ASimpleClass::someStaticMethod($template) == "ASimpleClass::someStaticMethod"');
assert('some_plugin($template) == "some_plugin"');
